This invention relates to an execution unit of a central processing unit within a data processing or computer system, and more particularly, to a circuit utilized for the execution of data manipulation type instructions including shift and rotate instructions.
In computer systems, various type computer words are defined having specific formats, including instruction words having a specified instruction format and data words having a plurality of predetermined data formats. In order to maximize the efficiency of the overall computer system, the data words can take on a variety of formats. The formats are defined to maximize memory storage efficiency, to minimize the time required for the conversion to an output device format, to maintain the data in a format readily available to the execution units, etc, the data selection being made by the designer to achieve one or more of the aforementioned objectives as they relate to the computer word size.
The various alpha, numeric, and special characters can be defined in a computer in a variety of ways. In many present, existing systems the characters are defined utilizing a grouping of eight bits in a coded format, commonly known as an 8-bit binary coded decimal (BCD) format. This grouping of eight bits allows sufficient capacity to define all the alpha characters, both upper and lower case, the numeric characters, and a variety of special characters, the 8-bit BCD format having achieved a high degree of standardization within the computer industry. In addition, the eight bits are divisible into the standard computer word sizes of many computer systems, these computer systems utilizing 8-bit bytes, or words of 16, 24, or 32 bits. These computer word sizes being divisible by 8 allow for a high degree of symmetry which is highly desirable in data manipulation. Occasionally a data word format is defined which alludes the desired symmetry. When such a case exists extra processing is required in manipulating the data. In large data systems, a computer word size of 36 bits is sometimes defined. In this case, in order to accommodate the 8-bit BCD standard, four characters of 9 bits each can be defined within the 36 bit computer word. A second format can be defined such that the 9 bit character can be divided to include two four-bit numeric characters. In such a format the symmetry mentioned above has been violated such that an extra bit exists in the nine-bit field. In a shifting network utilized for data words having both the nine-bit and four-bit data formats, before the shift operation of the data word having the four-bit format can take place, the characters must be packed without the extra bit, the characters are then shifted, and the shifted data is repacked to comply with the format definition.
In the present invention, a single shifting network is provided which allows the data words of both the four-bit format and nine-bit format to be aligned or shifted without requiring the packing and repacking operations to occur prior to the shifting operation.